import React, { Fragment, useEffect } from 'react'

import styles from './index.module.css'

import { useNavigate } from "react-router-dom";
import { Button } from 'antd-mobile';

function PersonalCare() {
	let navigate = useNavigate()

	//[]空数组相当于componentDidMount
	useEffect(() => {
		console.log('PersonalCare页面初始化了')
		return () => {


		}
	}, []);

	function click1() {
		navigate('/report', { replace: false })
	}

	function click2() {
		navigate('/dataScreen', { replace: false })
	}

	//渲染组件
	return (
		<Fragment>
			<Button style={{ width: '190px', marginTop: '15px' }} block color='primary' size='small' onClick={click1}>跳转案件上报</Button>
			<Button style={{ width: '190px', marginTop: '20px' }} block color='primary' size='small' onClick={click2}>跳转数据大屏</Button>
		</Fragment>

	)
}

export default PersonalCare;
